import request from "@/utils/request";

export const getTreeListApi = () => {
  return request({
    method: "GET",
    url: "/business-hall/tree",
  });
};

//获取员工分页数据
export const getEmployeeListApi = (params) => {
  return request({
    method: "GET",
    url: "/business-hall/user/page",
    params,
  });
};

//获取机构详情
export const getOrganizationDetailsApi = (id) => {
  return request({
    method: "GET",
    url: `/business-hall/${id}`,
  });
};

//获取省市地址
export const getAddressListApi = (params) => {
  return request({
    method: "GET",
    url: `/areas/children`,
    params,
  });
};

//获取运费管理列表
export const getFreightListApi = () => {
  return request({
    method: "GET",
    url: "/carriages",
  });
};

//删除
export const delApi = (id) => {
  return request({
    method: "DELETE",
    url: `/carriages/${id}`,
  });
};
